package org.rbreznak.tronco.client;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.MouseEvent;

import javax.swing.JLabel;

public class DummyScreen extends Screen{
	private static final long serialVersionUID = 1L;

	private JLabel statusText = new JLabel();
	
	public DummyScreen(String text) {
		setLayout(new BorderLayout());
		setBackground(new Color(0,0,0));
		
		FormatUI.formatLabel(statusText);
		
		add(statusText, BorderLayout.CENTER);
		
		statusText.setText(text);
		
		this.setVisible(true);
	}

	public void mouseClicked(MouseEvent arg0) {
		_fireScreenUpdate();
	}

	@Override
	public void decideNext() {
		if(nodes.size() > 0) {
			setNext(nodes.get(0));
		}
	}
	
	@Override
	public String toString() {
		return statusText.getText();
	}

	@Override
	public void reset() {
		setNext(null);
	}
}
